#ifndef SYSTEM_ALLOCATION_H_
#define SYSTEM_ALLOCATION_H_

#include "LunTotalStatistics.h"
#include "Lun.h"
#include "DeviceData.h"
#include <vector>
#include <map>
using namespace std;

#define GIGA 1024
#define TERA 1024*GIGA

// Holding all the information about our system 
class SystemAllocation
{
	double System_size;	/* entire size of system, according to sum of all lun sizes */
	double SSD_size;		/* total amount of SSD */
	double FC_size;		/* total amoud of FC */
	double SATA_size;		/* total amound of SATA */
	double extent_size;		/* size in MB */
	vector<double> *response_times; /* requested response times */
	map<double, list<Lun*>*>* SystemGroups; /* Map of Luns for each group */
	double group_percents[3]; /* Precentage of Luns for each group */
	int nof_luns;
	int system_cost;
	int fix_sata;

public:
	SystemAllocation();
	~SystemAllocation();

	//Getters
	double getSSD_size(){return SSD_size;};
	double getFC_size(){return FC_size;};
	double getSATA_size(){return SATA_size;};
	double getExtent_size(){return extent_size;};
	map<double, list<Lun*>*>* getSystemGroups(){ return SystemGroups; };
	map<double, list<Lun*>*>* getGroups() {return SystemGroups;};
	int getSystem_cost(){return system_cost;};
	int getFix_sata(){return fix_sata;};
	double* getGroupPercents(){return group_percents;};

	//Setters
	void setResponseTimes(vector<double>* response_times);
	void setSSD_size(DeviceData* device, double devCount);
	void setFC_size(DeviceData* device, double devCount);
	void setSATA_size(DeviceData* device, double devCount);
	void setGroupsPercentsNumOfLuns(double gp1, double gp2,double gp3,int n_luns);
	void setSystem_cost(int cost);
	void setFix_sata(int sata);
	// setting the desired response time of the LUN l randomly to one of the desired response time (vector<double> *response_times)
	int setRandomResponseTime(Lun* l);
};
#endif /* SYSTEM_ALLOCATION_H_ */